<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <input data-counter type="text" value="100" />
    <input data-counter type="button" value="1" />
    <script>
      document.onclick = function (e) {
        const counter = e.target.dataset.counter;
        if (counter !== undefined) {
          e.target.value++;
        }
      };
    </script>
  </body>
</html>
